<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	request.setAttribute("path", request.getContextPath());
	String userid = "";
	Cookie[] cookies = request.getCookies();
	    if(cookies != null){
	        for(Cookie cookie : cookies){
	            if("userid".equals(cookie.getName())){
	            	 userid = cookie.getValue();
	            }
	        }
	    }
%> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>****</title>

<!-- bootstrap -->
<link rel="stylesheet" href="${path}/portal/css/bootstrap.min.css" />
<link rel="stylesheet" href="${path}/portal/css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="${path}/portal/css/matrix-login.css" />
<link rel="stylesheet" href="${path}/portal/css/uniform.css" />
<link rel="stylesheet" href="${path}/portal/font-awesome/css/font-awesome.css"  />
        
<!-- my part -->
<link rel="stylesheet" href="${path}/portal/css/base/common.css" type="text/css" />
<jsp:include page="${path}/portal/base/check.jsp"></jsp:include>
</head>

<body>
 <div id="loginbox"> 
 <form id="login" class="form-horizontal">
 				<div class="control-group normal_text"> <h3><img src="portal/img/logo.png" alt="Logo" /></h3></div>
				<div class="control-group">
						<label class="control-label">用户名:</label>
                       <div class="controls">
                            <input type="text" class="form-control" value="admin" name="id" id="id"  placeholder="请输入用户名">
                        </div>
                </div>
                <div class="control-group">
                		<label class="control-label">密码:</label>
                        <div class="controls">
                            <input type="password" class="form-control" id="password" name="password" value="1234567" placeholder="请输入密码">
                        </div>
                </div> 
              <div class="form-actions">
	              	<span class="pull-right" style="padding-right: 17%"><button type="button" class="btn  btn-success" onclick="login()">登录</button></span>
             </div>                
 </form>
 </div>
		      
<jsp:include page="./portal/base/footer.jsp"></jsp:include>

<script src="${path}/portal/js/jq/jquery.min.js"></script>  
<script src="${path}/portal/js/jq/bootstrap.min.js"></script>  
<script src="${path}/portal/js/base/common.js"></script>
<script type="text/javascript">
	$(function () {
		common.progressDialog("查询中...");
		$("#id").focus();
		$("#id").change(function (){
			check.userId("id");
		});
		$("#password").change(function (){
			check.password("password");
		});
		if("${param.timeout}"){
			alert("您尚未登陆或页面已超时,请重新登录!");
		}
		common.closeProgressDialog();
	});
	function login(){
		if(check.userId("id") & check.password("password")){
			common.ajaxSubmit("${path}/dream/app/login","login","登录失败,请重试",null,"loginSuccess()");
		}
	}
	function loginSuccess(){
		common.reload("${path}/dream/view/page?loc=portal&h=h01&n=n01");
	}
</script>
</body>
</html>

 

